package com.engine.salary.entity.datacollection.dto;

import com.engine.salary.annotation.*;
import com.engine.salary.enums.auth.AuthCheckTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.Set;

/**
 * 数据采集-考勤引用列表
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "a4f852o1-e3f9-7841-adn9-7d06e54y6rj8", operates = {
        @SalaryTableOperate(text = "查看", index = "0"),
        @SalaryTableOperate(text = "删除", index = "1")
})
@Auth(page = "attendQuote",checkType = AuthCheckTypeEnum.SOB)
public class AttendQuoteListDTO {

    @SalaryTableColumn(column = "id", display = false)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @SalaryTableColumn(text = "薪资所属月", width = "10%", column = "salaryYearMonth", transmethod = "com.engine.salary.transmethod.TransMethod.timeToMoth")
    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    @TableTitle(title = "薪资所属月", dataIndex = "salaryYearMonth", key = "salaryYearMonth")
    private Date salaryYearMonth;

    @SalaryTableColumn(text = "关联账套", width = "10%", column = "salarySobName")
    @TableTitle(title = "关联账套", dataIndex = "salarySobName", key = "salarySobName")
    private String salarySobName;

    @SalaryTableColumn(text = "考勤周期", width = "10%", column = "attendCycle")
    @TableTitle(title = "考勤周期", dataIndex = "attendCycle", key = "attendCycle")
    private String attendCycle;

    @SalaryTableColumn(text = "来源", width = "10%", column = "sourceType")
    @TableTitle(title = "来源", dataIndex = "sourceType", key = "sourceType")
    private String sourceType;

    @SalaryTableColumn(text = "薪资周期", width = "10%", column = "salaryCycle")
    @TableTitle(title = "薪资周期", dataIndex = "salaryCycle", key = "salaryCycle")
    private String salaryCycle;

    @SalaryTableColumn(text = "操作人", width = "10%", column = "creator")
    @TableTitle(title = "操作人", dataIndex = "creator", key = "creator")
    private String creator;

    @SalaryTableColumn(text = "备注", width = "10%", column = "description")
    @TableTitle(title = "备注", dataIndex = "description", key = "description")
    private String description;

    /**
     * 薪资核算状态。0：未核算、1：已核算
     */
    private Integer salaryAccountingStatus;

    /**
     * 能否删除
     */
    private Boolean canDelete;

    /**
     * 薪资账套id
     */
    private Long salarySobId;

    private Set<String> opts;
}
